import { sapGetRequest, cancelRequest } from "./sapProxy";
export default {
  //取消请求的通用方法
  handleCancelRequest(requestId, message) {
    cancelRequest(requestId, message);
  },

  //组织架构搜索接口
  //   "IM_SYSID": "ZZJG", //系统标识，组织架构
  // "IM_OBJID": "人力", //输入框查询参数
  // //    "IM_PERNR": "", //操作人工号
  // "IM_DATE": "20250311", //查询日期
  // //    "IM_OTYPE": "", //操作类型，非必填
  // //    "IM_LANGU": "", //语言，非必填，
  // "IM_FLAG": "" //标记，X表示取组织链路
  // //    "IM_PAGE": "1", //分页，页数
  // //    "IM_PGNUM": "10" //分页，每页数量
  search(params, cancelable, requestId) {
    return sapGetRequest(
      "/RESTAdapter/LY/HCM/IF0622",
      params,
      cancelable,
      requestId
    );
  },

  //请求组织架构list
  fetchList(params) {
    return sapGetRequest("/RESTAdapter/LY/HCM/IF0625", params);
  },
  //汇报关系-汇报人信息
  reportInfo(params) {
    return sapGetRequest("/RESTAdapter/LY/HCM/IF0588", params);
  },
  //员工档案
  personInfo(params) {
    return sapGetRequest("/RESTAdapter/LY/HCM/IF0631", params);
  },
};
